home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / picsearchoptions.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-02-15  |  2.0 KB  |  74 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. #ifndef PICSEARCHOPTIONS_H
  8. #define PICSEARCHOPTIONS_H
  9.  
  10. #include "scribusapi.h"
  11. #include "ui_picsearchoptions.h"
  12.  
  13. class FileSearch;
  14.  
  15. class SCRIBUS_API PicSearchOptions : public QDialog, Ui::PicSearchOptions
  16.     Q_OBJECT
  17.  
  18. public:
  19.     PicSearchOptions(QWidget* parent, const QString & fileName,const QString & searchBase);
  20.     ~PicSearchOptions() {};
  21.     /**
  22.      * \brief Fetch the last used searchBase.
  23.      * @return Path string.
  24.      */
  25.     const QString &getLastDirSearched () { return m_strLastDirSearched; }
  26.  
  27.     /**
  28.      * \brief Fetch the filename used for the last search.
  29.      * @return Filename string.
  30.      */
  31.     const QString &getFileName () { return m_strFileName; }
  32.  
  33.     /**
  34.      * \brief Fetch all found matches.
  35.      * @return List of file paths.
  36.      */
  37.     const QStringList &getMatches () { return m_listMatches; }
  38.  
  39.     /**
  40.      * \brief Did the user cancel the search?
  41.      * @return <code>bool</code> TRUE if cancelled.
  42.      */
  43.     bool getCancelled () { return m_bCancelled; }
  44.  
  45. private slots:
  46.     void slotChangeSearchDir();
  47.     void slotSearchPic();
  48.     void slotSearchPicAborted(bool userCancelled);
  49.     void slotSearchPicFinished(const QStringList & matches, const QString & fileName);
  50.  
  51. private:
  52.     QString         m_strFileName;
  53.     QString         m_strLastDirSearched;
  54.     QStringList     m_listMatches;
  55.     bool         m_bCancelled;
  56.  
  57. protected:
  58.     /**
  59.      * \brief Toggle a search button in the table between "Search" and "Cancel Search",
  60.      * fixing signal connections as well.
  61.      * \param toCancel true in the "cancelation" state/process
  62.      * \param searcher a reference to the searcher object 
  63.      */
  64.     void setSearchButton(bool toCancel, const FileSearch* searcher);
  65.     /**
  66.      * \brief Enable/disable gui elements while searching.
  67.      * @param enable Set to FALSE if searching.
  68.      */
  69.     void enableGuiWhileSearching (bool enable);
  70. };
  71.  
  72. #endif
  73.